


public class polymorphicClass {
public static void  test(polymorphic c){
c.voice();
		
}
	
	
	
	
	
public static void main(String[] args){
  polymorphic a=new Cat(); 
  polymorphic b=new Dog();
  polymorphic c=new Tiger();
  
  test(a);
  test(b);
  test(c);
  ((Cat) a).catchMouse();
  ((Dog) b).seedoor();
  ((Tiger) c).onPrey();
  
  
	
}
	
	
	
}
